package dashboardService

import (
	"gitee.com/yangguoliang001/go-gin-vue3/dao/dashboardDao"
	"gitee.com/yangguoliang001/go-gin-vue3/vo"
	"github.com/gin-gonic/gin"
	"github.com/go-redis/redis/v7"
	"gorm.io/gorm"
)

type DashboardService interface {
	QuerySystemInfo(c *gin.Context) (dashboardInfo vo.DashboardVo, err error)
}

type dashboardService struct {
	cache        *redis.Client
	dashboardDao dashboardDao.DashboardDao
}

//var _ Service = (*dashboardService)(nil)

func New(cache *redis.Client, db *gorm.DB) DashboardService {
	return &dashboardService{
		cache:        cache,
		dashboardDao: dashboardDao.New(db),
	}
}
